//
//  PlayCell.m
//  BabyBedtimeStory
//
//  Created by qianfeng on 15-7-2.
//  Copyright (c) 2015年 张鹏毅. All rights reserved.
//

#import "PlayCell.h"
#import "UIImageView+WebCache.h"
@implementation PlayCell

- (void)awakeFromNib {
    // Initialization code
}

-(void)showWithModel:(StoryModel *)model{
    self.model = model;
    [self.image_urlImageView sd_setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:[UIImage imageNamed:@"yujiazai"]];
    self.titleLabel.text = model.title;
    self.album_titleLable.text = model.album_title;
    NSLog(@"%@,%@",model.title,model.album_title);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)btnClick:(id)sender {
    [[DBManager sharedManager]deleteModelForAppId:self.model.id recordType:kDownloads];
    if (self.blok) {
        self.blok(self.model);
    }
}
-(void)isRing:(MyBlock)block{
    self.blok = block;
}

@end
